using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using ShopPowerTemplate.IoC;
using ShopPowerTemplate.Entities;
using ShopPowerTemplate.Services.Tests.Properties;

namespace ShopPowerTemplate.Services.Tests
{
    public partial class ImageServiceUtil
    {
	
		static internal IImageService CreateImageService()
        {
            IImageService target = IoCFactory.Resolve<IImageService>();
            return target;
        }
				#region Image Test
 
        

		public static Image CreateImage()
        {
            Image result = GetImage();
            IImageService service = CreateImageService();
			service.Add(result);

			result = service.Find(result.Id);
            return result;
        }
		
		public static Image CreateImageFull()
        {
            Image result = GetImageFull();
            IImageService service = CreateImageService();
			service.Add(result);

			result = service.Find(result.Id);
            return result;
        }
				
        public static Image GetImage()
        {
            Image result = new Image();
			
            result.Name = Guid.NewGuid().ToString();

            result.Description = Guid.NewGuid().ToString();

            result.SortOrder = 1;

			result.Data =  Resources.test;

        	result.Product = ProductServiceUtil.CreateProduct(); 
 
            return result;
            
        }
		
        public static Image GetImageFull()
        {
            Image result = GetImage();
             
            return result;
            
        }
		
		#endregion Image Test
	

	}
}
